﻿<UserControl x:Class="OpenRiaServices.Issue92.MainPage"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             d:DesignHeight="300"
             d:DesignWidth="400"
             DataContext="{Binding Main,
                                   Source={StaticResource Locator}}"
             mc:Ignorable="d">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <TextBlock>Number of child entities:</TextBlock>
            <TextBox Grid.Column="1" Text="{Binding NumberOfChildEntitiesText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
        </Grid>
        <Button Grid.Row="1"
                Command="{Binding DoBenchmarkCommand}"
                Content="Run Test" />
        <Button Grid.Row="2"
                Command="{Binding ClearLogCommand}"
                Content="Clear Log" />
        <TextBox Grid.Row="3" Text="{Binding Log, Mode=OneWay}" />
    </Grid>
</UserControl>
